#ifndef _MY_TI_H_
#define _MY_TI_H_

#ifdef MATLAB_MEX_FILE
#include "tmwtypes.h"
#else
#include "rtwtypes.h"
#include "F28x_Project.h"
#endif

#define PI 3.141592654

void _my_initialization(void);
void _enable_global_interrupt(void);
void _disable_global_interrupt(void);
//uint16_T my_mod(uint16_T data,uint16_T d_mod);

#define ONE_DIV_TWO_PI 0.1591549430F//1.0F/(2*3.14159265358979)

#ifndef MATLAB_MEX_FILE
    #define my_mod(data,d_mod) {(data) % (d_mod)}
    #define tmu_sin(theta) __sinpuf32(theta * ONE_DIV_TWO_PI)
    #define tmu_cos(theta) __cospuf32(theta * ONE_DIV_TWO_PI)
#else
    #define my_mod(data,d_mod) 0
    #define tmu_sin(theta) 0
    #define tmu_cos(theta) 0
#endif    


// float tmu_sin(float theta);
// float tmu_cos(float theta);


#endif

